﻿<Window x:Class="ElementsTemplate.MainWindow"
		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:d3="http://research.microsoft.com/DynamicDataDisplay/1.0"
		xmlns:d3a="http://research.microsoft.com/DynamicDataDisplay/1.1"
		Title="MainWindow" Height="350" Width="525" Loaded="Window_Loaded">
	<Grid>
		<d3:ChartPlotter Name="plotter">
			<d3:TemplateChart Name="chart" Items="{Binding}">
				<ControlTemplate>
					<d3a:LineChart ItemsSource="{Binding}" Stroke="{Binding Brush}"/>
				</ControlTemplate>
			</d3:TemplateChart>

			<StackPanel Canvas.Right="10" Canvas.Bottom="10">
				<Button Name="addButton" Click="addButton_Click">Add chart</Button>
				<Button Name="removeButton" Click="removeButton_Click">Remove chart</Button>
			</StackPanel>
		</d3:ChartPlotter>
	</Grid>
</Window>
